﻿using mybolg.DAL;
using mybolg.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace mybolg.Controllers.ShuoShuo
{
    public class ShuoShuoController : Controller
    {
        Models.BlogEntities11 DBblog = new BlogEntities11();
        //
        // GET: /Themes/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Details(string id)
        {
             var query = from s in DBblog.DMP_Bolg_ShuoShuoDetail
                        where s.id == id
                        select s;
            var ssDetail = query.ToList();
            if (ssDetail.Count > 0)
            {
                var ss = DBblog.DMP_Bolg_Shuoshuo.Find(ssDetail[0].ShuoShuoId);
                if (ss != null && ss.IsDelete != 1)
                {
                    ViewBag.Name = ss.Name;
                    ViewBag.Detail = ssDetail[0].Detail;
                }
            }
           

            return View();

        }

        public ActionResult Index3()
        {
            return View();
        }

        public ActionResult Index4()
        {
            return View();
        }

    }
}
